package com.icloud.admin.query.dto;


import com.icloud.framework.query.TreeNode;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class MenuDTO extends TreeNode {

    private String id;
    private String parentId;
    private String name;
    private String href;
    private Integer position;
    private String icon;
    private String category;
    private String frontComponent;
    private String description;
    private boolean enabled;

    private boolean isAssigned;

    private String version;
    private Date createdAt;
    private String createdBy;
    private Date lastModifiedAt;
    private String lastModifiedBy;



    private List<MenuDTO> children = new ArrayList<MenuDTO>();


    @Override
    public Integer findSortValue() {
        return position;
    }

    @Override
    public List findChildren() {
        return children;
    }

    @Override
    public String findKey() {
        return id;
    }

    @Override
    public String findParentId() {
        return parentId;
    }
}